package cn.abstractfactory.csl;

/**
 * Created by siyuzhiyue on 2017/6/9.
 */
public class ColorFactory extends AbstractFactory {
    @Override
    Color getColor(String color) {
        if(color == null)
            return null;
        else if("RED".equalsIgnoreCase(color))
            return new Red();
        else if("GREEN".equalsIgnoreCase(color))
            return new Green();
        else if("BLUE".equalsIgnoreCase(color))
            return new Bule();
        return null;
    }

    @Override
    Shape getShape(String shape) {

        return null;
    }
}
